package br.infotec.musicaunb.domain;


import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.springframework.data.jpa.domain.AbstractPersistable;

@Entity
@Table(name = "acompanhante")
public class Acompanhante extends AbstractPersistable<Long> implements AbstraticPojo {

	/**
	 * @author Denis
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	// atributos originais
	private String nome;	
	// atributos relacionais
	private Responsavel responsavel;
	private List<Telefone> telefones;	
	
	@ManyToOne
	@JoinColumn(name = "id_responsavel")
	public Responsavel getResponsavel() {
		return responsavel;
	}
	public void setResponsavel(Responsavel responsavel) {
		this.responsavel = responsavel;
	}
	
	@OneToMany(mappedBy = "acompanhante")	
	public List<Telefone> getTelefones() {
		return telefones;
	}
	public void setTelefones(List<Telefone> telefones) {
		this.telefones = telefones;
	}
	@Column(name = "nome")
	public String getNome() {
		return nome;
	}
	public void setNome(String nome) {
		this.nome = nome;
	}
}
